import BaseLayout from '@/views/layouts/BaseLayout/index.vue';

export default [
  {
    path: '',
    component: BaseLayout,
    children: [
      { path: '', name: 'homeIndex', meta: { title: '首页' }, component: (resolve) => require(['@/views/home/index.vue'], resolve) }
    ]
  },

  {
    path: '/user',
    component: BaseLayout,
    children: [
      { path: 'index', name: 'userIndex', meta: { title: '用户列表' }, component: (resolve) => require(['@/views/user/index.vue'], resolve) },
      { path: 'create', name: 'userCreate', meta: { title: '创建用户' }, component: (resolve) => require(['@/views/user/create.vue'], resolve) },
      { path: 'update/:id', name: 'userUpdate', meta: { title: '修改用户' }, component: (resolve) => require(['@/views/user/update.vue'], resolve) },
      { path: 'team/:id', name: 'userTeam', meta: { title: '用户分享人' }, component: (resolve) => require(['@/views/user/team.vue'], resolve) },
			{ path: 'parent/:id', name: 'userParent', meta: { title: '用户推荐人' }, component: (resolve) => require(['@/views/user/parent.vue'], resolve) },
      { path: 'recharge', name: 'userRecharge', meta: { title: '用户充值' }, component: (resolve) => require(['@/views/user/recharge.vue'], resolve) },
      { path: 'message', name: 'userMessage', meta: { title: '用户留言' }, component: (resolve) => require(['@/views/user/message.vue'], resolve) },
      { path: 'wallet/transfer/log', name: 'userWalletTransferLog', meta: { title: '转账日志' }, component: (resolve) => require(['@/views/user/wallet/transfer/log.vue'], resolve) }
    ]
  },

  {
    path: '/shop',
    component: BaseLayout,
    children: [
      { path: 'products', name: 'shopProductsIndex', meta: { title: '产品列表' }, component: (resolve) => require(['@/views/shop/products/index.vue'], resolve) },
      { path: 'products/create', name: 'shopProductsCreate', meta: { title: '创建产品' }, component: (resolve) => require(['@/views/shop/products/create.vue'], resolve) },
      { path: 'products/update/:products_id', name: 'shopProductsUpdate', meta: { title: '修改产品' }, component: (resolve) => require(['@/views/shop/products/update.vue'], resolve) },

      { path: 'products/class', name: 'shopProductsClassIndex', meta: { title: '产品分类' }, component: (resolve) => require(['@/views/shop/products/class/index.vue'], resolve) },
      { path: 'products/class/create', name: 'shopProductsClassCreate', meta: { title: '创建分类' }, component: (resolve) => require(['@/views/shop/products/class/create.vue'], resolve) },
      { path: 'products/class/update/:products_class_id', name: 'shopProductsClassUpdate', meta: { title: '修改分类' }, component: (resolve) => require(['@/views/shop/products/class/update.vue'], resolve) },

      { path: 'order', name: 'shopOrderIndex', meta: { title: '订单列表' }, component: (resolve) => require(['@/views/shop/order/index.vue'], resolve) }
    ]
  },

  {
    path: '/trade',
    component: BaseLayout,
    children: [
      { path: 'buy', name: 'tradeBuyIndex', meta: { title: '进货列表(零售)' }, component: (resolve) => require(['@/views/trade/buy/index.vue'], resolve) },
      { path: 'buy/:id/match', name: 'tradeBuyMatch', meta: { title: '进货匹配(零售)' }, component: (resolve) => require(['@/views/trade/buy/match.vue'], resolve) },

      { path: 'sell', name: 'tradeSellIndex', meta: { title: '销售列表(零售)' }, component: (resolve) => require(['@/views/trade/sell/index.vue'], resolve) },
      { path: 'sell/:id/match', name: 'tradeSellMatch', meta: { title: '销售匹配(零售)' }, component: (resolve) => require(['@/views/trade/sell/match.vue'], resolve) },

      { path: 'business/buy', name: 'tradeBusinessBuyIndex', meta: { title: '进货列表(业务)' }, component: (resolve) => require(['@/views/trade/business/buy/index.vue'], resolve) },
      { path: 'business/buy/:id/match', name: 'tradeBusinessBuyMatch', meta: { title: '进货匹配(业务)' }, component: (resolve) => require(['@/views/trade/business/buy/match.vue'], resolve) },

      { path: 'business/sell', name: 'tradeBusinessSellIndex', meta: { title: '销售列表(业务)' }, component: (resolve) => require(['@/views/trade/business/sell/index.vue'], resolve) },
      { path: 'business/sell/:id/match', name: 'tradeBusinessSellMatch', meta: { title: '销售匹配(业务)' }, component: (resolve) => require(['@/views/trade/business/sell/match.vue'], resolve) }
    ]
  },

  {
    path: '/backendAccount',
    component: BaseLayout,
    children: [
      { path: 'index', name: 'backendAccountIndex', meta: { title: '管理员列表' }, component: (resolve) => require(['@/views/backend/account/index.vue'], resolve) },
      { path: 'create', name: 'backendAccountCreate', meta: { title: '创建管理员' }, component: (resolve) => require(['@/views/backend/account/create.vue'], resolve) },
      { path: 'update/:id', name: 'backendAccountUpdate', meta: { title: '修改管理员' }, component: (resolve) => require(['@/views/backend/account/update.vue'], resolve) },
      { path: 'roles', name: 'backendAccountRolesIndex', meta: { title: '角色列表' }, component: (resolve) => require(['@/views/backend/account/roles/index.vue'], resolve) },
      { path: 'roles/create', name: 'backendAccountRolesCreate', meta: { title: '创建角色' }, component: (resolve) => require(['@/views/backend/account/roles/create.vue'], resolve) },
      { path: 'roles/:id/resources', name: 'backendAccountUpdateResources', meta: { title: '权限设置' }, component: (resolve) => require(['@/views/backend/account/roles/resources.vue'], resolve) }
    ]
  },

  {
    path: '/system',
    component: BaseLayout,
    children: [
      { path: 'notice', name: 'systemNoticeIndex', meta: { title: '公告列表' }, component: (resolve) => require(['@/views/notice/index.vue'], resolve) },
      { path: 'notice/create', name: 'systemNoticeCreate', meta: { title: '添加公告' }, component: (resolve) => require(['@/views/notice/create.vue'], resolve) },
      { path: 'notice/update/:id', name: 'systemNoticeUpdate', meta: { title: '修改公告' }, component: (resolve) => require(['@/views/notice/update.vue'], resolve) },
      { path: 'swipe', name: 'systemSwipeIndex', meta: { title: '轮播列表' }, component: (resolve) => require(['@/views/swipe/index.vue'], resolve) },
      { path: 'swipe/create', name: 'systemSwipeCreate', meta: { title: '添加轮播' }, component: (resolve) => require(['@/views/swipe/create.vue'], resolve) },
      { path: 'bankInfo', name: 'systemBankInfo', meta: { title: '修改银行信息' }, component: (resolve) => require(['@/views/system/bankInfo/index.vue'], resolve) },
      { path: 'parameter', name: 'systemParameterIndex', meta: { title: '系统参数' }, component: (resolve) => require(['@/views/system/parameter/index.vue'], resolve) },
      { path: 'parameter/:key', name: 'systemParameterUpdate', meta: { title: '修改参数' }, component: (resolve) => require(['@/views/system/parameter/update.vue'], resolve) }
    ]
  },

  { path: '/login', name: 'login', meta: { title: '登陆' }, component: (resolve) => require(['@/views/login/index.vue'], resolve) }
];
